import logging

from absl import flags


flags.DEFINE_string('logging_level', 'INFO', '')


def init_logging():
  logger = logging.getLogger()
  logger.setLevel(flags.FLAGS.logging_level)
  formatter=logging.Formatter(
      '%(levelname)8s %(asctime)s %(name)s %(process)d %(filename)s:%(lineno)d] %(message)s')
  logger.handlers[0].setFormatter(formatter)
